import VueRouter from 'vue-router'

import homeVC from '../src/components/tabbar/homeVc.vue'
import memberVC from '../src/components/tabbar/memberVc.vue'
import shopVC from '../src/components/tabbar/shopVc.vue'
import searchVC from '../src/components/tabbar/searchVc.vue'

import newList from '../src/components/news/newsList.vue'
import newInfo from '../src/components/news/newInfo.vue'

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:homeVC},
    {path:'/member',component:memberVC},
    {path:'/shopcar',component:shopVC},
    {path:'/search',component:searchVC},
    {path:'/home/newlist',component:newList},
    //新闻详情页面带有传递的 新闻 id 参数
    {path:'/home/newInfo/:id',component:newInfo},

  ],
  linkActiveClass:'mui-active' //覆盖默认路由高亮的类 rlink-active
})

// 把路由对象暴露出去
export default router